package shiqi.SingletonPattern;
//饿汉式单例，单例实例在类加载的时候就已经实例化
public class EagerSingleton {

    private EagerSingleton() {}

    private static EagerSingleton eagerSingleton = new EagerSingleton();

    public static EagerSingleton getInstance() {
        return eagerSingleton;
    }
}
